import axios from 'axios'

let interceptor = ''
export const myInterceptor = interceptor

//    设置请求拦截器
export const setInterceptor = function (response) {
    axios.interceptors.request.use((config) => {
        config.headers.Authorization = token    //设置请求头Authorization
        config.headers.Accept = 'application/json'    //设置请求头Accept 
       /*
           具体配置需要根据实际开发情况来配置
       */
        return config
    })
}
//    移除请求拦截器
export const clearInterceptor = function () {
  axios.interceptors.request.eject(myInterceptor)
}
